﻿using System.Linq.Expressions;
using Basic.FormModel.DB;
using Basic.FormRemoteModel;
using Basic.FormRemoteModel.Form.Model;
using WeDonekRpc.Model;

namespace Basic.FormCollect
{
    public interface ICustomFormCollect
    {
        DBCustomForm Add ( FormAdd data );
        bool CheckIsPhysical ( long formId );
        bool CheckIsUse ( long id );
        void Delete ( DBCustomForm source );
        DBCustomForm Get ( long id );
        Result Get<Result> ( long id, Expression<Func<DBCustomForm, Result>> selector );
        Result Get<Result> ( long formId ) where Result : class;
        Dictionary<long, string> GetName ( long[] ids );
        Dictionary<long, int> GetPhyGroupUseNum ( long[] longs );
        Result[] Gets<Result> ( long[] ids ) where Result : class;
        Result[] Gets<Result> ( long[] ids, Expression<Func<DBCustomForm, Result>> selector );
        void LockForm ( LockFormArg arg );
        Result[] Query<Result> ( FormQuery query, IBasicPage paging, out int count ) where Result : class;
        bool Set ( DBCustomForm source, FormSet set );
        void SetLayoutType ( DBCustomForm form, FormLayoutType layout );
        bool SetStatus ( DBCustomForm source, FormStatus status );
    }
}